package com.example.lib_mvp.views;

import android.content.Context;
import android.util.AttributeSet;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
 * EditText 控制输入位数及限制
 */
public class EarTagEditText extends androidx.appcompat.widget.AppCompatEditText {


    public EarTagEditText(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init(context, attrs, 0);
    }


    public EarTagEditText(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context, attrs, defStyleAttr);
    }

    private void init(Context context, AttributeSet attrs, int i) {
        addTextChangedListener(new LettersAndNumbersTextWatcher(this));

    }
}
